cmake_minimum_required(VERSION 3.28)
project(linux_server  CXX)
set(CMAKE_CXX_STANDARD 14)

# 启用调试信息和所有警告
add_compile_options(-g -Wall)

# 包含头文件
include_directories(./include)  
include_directories(./include/logic_handler)
include_directories(./include/logic_handler/message_struct)
# 查找源文件
aux_source_directory(./logic_handler logic_handler_src)
aux_source_directory(./misc misc_src)
aux_source_directory(./socket socket_src)
aux_source_directory(./logic_handler/message_struct message_struct_src)


add_executable(linux_server  ./main.cpp  ${logic_handler_src} ${misc_src} ${socket_src} ${message_struct_src})
# 连接库
target_link_libraries(linux_server pthread)
target_link_libraries(linux_server protobuf)
target_link_libraries(linux_server  mysqlclient)


